package com.practice.J2E.Test;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

/**
 * desc
 *
 * @author: kayn
 * 2025-04-05 16:01
 **/
public class MapTest {

    public static void main(String[] args) {
//        System.out.println(StrUtil.equals(Boolean.TRUE.toString(),"false"));

        System.out.println(StrUtil.equalsAny("false", "1",Boolean.TRUE.toString()));

//        test1();
    }

    private static void test1() {

        String addr = "DB100.100";

        List<String> addrSplitList = StrUtil.split(addr, StrUtil.DOT);
        if (CollUtil.isNotEmpty(addrSplitList)) {

            String lastNum = addrSplitList.get(addrSplitList.size() - 1);
            if (NumberUtil.isNumber(lastNum)) {
                int lastNumAfterAddOne = Integer.parseInt(lastNum) + 1;
                addrSplitList.set(addrSplitList.size()-1,String.valueOf(lastNumAfterAddOne));
                addr = StrUtil.join(StrUtil.DOT, addrSplitList);
            }
        }

        System.out.println(addr);
    }
}
